﻿using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Web;
using System.Web.Mvc;
namespace Model
{

    [MetadataType(typeof(CustomerContact_Metadata))]
    [DisplayName("CustomerContact")]
    public partial class CustomerContact
    {
        public CustomerContact()
        {
            this.Id = Guid.NewGuid();
            this.UserId = new Guid(HttpContext.Current.User.Identity.Name);
        }

        public class CustomerContact_Metadata
        {
            [ScaffoldColumn(false)]
            public Guid Id { get; set; }

            [DisplayName("公司名称")]
            [DropDownList("Customer", "Id", "CustomerName")]
            [Required]
            public object CustomerId { get; set; }


            [DisplayName("联系人")]
            [Required]
            public object Name { get; set; }

            [DisplayName("电话")]
            [DisplayFormat(ConvertEmptyStringToNull=false)]
            public object Telepbone { get; set; }

            [DisplayName("手机")]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public object Phone { get; set; }

            [DisplayName("传真")]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public object Fax { get; set; }

            [DisplayName("邮箱")]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public object Email { get; set; }

            [DisplayName("QQ")]
            [DisplayFormat(ConvertEmptyStringToNull = false)]
            public object QQ { get; set; }

            [DisplayName("添加时间")]
            public object DateTime { get; set; }


            [ScaffoldColumn(false)]
            public Guid UserId { get; set; }

            //[DisplayName("标题")]
            //[Required]
            //public object Title { get; set; }



        }
    }
}
